<template>
  <RouterView class="app-view" />
  <van-tabbar route placeholder>
    <van-tabbar-item icon="home-o" to="/">首页</van-tabbar-item>
    <van-tabbar-item icon="apps-o" to="/category">分类</van-tabbar-item>
    <van-tabbar-item icon="chat-o" to="/message" :badge-props="{ content: '···' }">消息</van-tabbar-item>
    <van-tabbar-item icon="shopping-cart-o" to="/car" :badge-props="{ 'show-zero': false }"
      :badge="carStore.car.length">购物车</van-tabbar-item>
    <van-tabbar-item icon="user-o" to="/my">我的</van-tabbar-item>
  </van-tabbar>
</template>
<script setup>
import { useCarStore } from "@/stores/car";
const carStore = useCarStore();
</script>

<style scoped>
.app-view {
  height: calc(100vh - 50px);
  overflow: scroll;
}
</style>
